package com.ycz.form;/*
 @author ycz
 @date 2021-11-22-8:55
*/

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BlogForm {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @NotEmpty(message = "置顶不能为空")
    private String isTop;
    @NotEmpty(message = "热度不能为空")
    private String isHot;
    @Length(max = 500,message = "图片路径长度最大为500个字符")
    private String  banner;

    private Date putTime;

    @NotEmpty(message = "题目不能为空")
    @Length(min = 1,max = 50,message = "题目最大为50")
    private String title;

    @NotEmpty(message = "总结不能为空")
    @Length(min = 1,max = 100,message = "总结最大为100")
    private String summary;

    @NotEmpty(message = "文章内容不能为空")
    private String content;

    private Integer  viewsCount;

    private Integer commentsCount;

    private Long userId;



}
